//
//  ViewController.m
//  二维码
//
//  Created by 绿水 on 16/3/16.
//  Copyright © 2016年 MJ. All rights reserved.
//

#import "ViewController.h"
#import "RootViewController.h"
@interface ViewController ()


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(100, 100, 100, 40);
    [button addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
    button.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:button];



}

-(void)btnClick:(UIButton *)sender
{
    
   RootViewController *viewController =  [[RootViewController alloc]init];
    
    [self presentViewController:viewController animated:YES completion:nil];
    
    
    
    
    
}



@end
